package com.invengo.module_check.ui.fragment.search;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.Nullable;

import com.afollestad.materialdialogs.MaterialDialog;
import com.invengo.library_db.utils.SystemUtil;
import com.invengo.module_check.BR;
import com.invengo.module_check.R;
import com.invengo.module_check.databinding.FragmentSearchAddBinding;

import me.goldze.mvvmhabit.base.BaseFragment;

public class AddBookFragment extends BaseFragment<FragmentSearchAddBinding, BookAddViewModel> {
    @Override
    public int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return R.layout.fragment_search_add;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public String getRightTitle() {
        return "导入列表";
    }


    private MaterialDialog inportDialog;

    @Override
    public void onRightEvent(View view) {
        SystemUtil.openLocalDir(getActivity(),10086);
//        if (inportDialog == null)
//            inportDialog = MaterialDialogUtils.showBasicDialogNoTitle(getContext(), "请确认Download文件加下有该文件：\n"+Constants.IMPORT.IMPORT_SEARCH_ADD_NAME)
//                    .onPositive((dialog, which) -> {
//                        viewModel.getBooksByExcel();
//                    }).build();
//        if (!inportDialog.isShowing())
//            inportDialog.show();
    }

    @Override
    public void initData() {
    }



    @Override
    public void initViewObservable() {

    }
}
